{{#if passiveError}}
    <div class="ui-bar ui-bar-a">
        {{passiveError}}
    </div>
{{/if}}
<form>
	<div class="inline-label-container">
        {{> labelHint}}
    </div>
    <fieldset
    data-role="controlgroup"
    data-type="horizontal"
    style="float:right;margin-left:1em;display:block;"
    {{#eachProperty inputAttributes}}
        {{property}}="{{value}}"
    {{/eachProperty}}
    >
        {{#each choices}}
            <label>
                <input
                    {{#if ../select_one}}
                        type="radio"
                    {{else}}
                        type="checkbox"
                    {{/if}}
                    {{#if checked}}
                        checked="checked"
                    {{/if}}
                        
                    {{! the name attribue has to be the same for all the options}}
                    name="{{../name}}"
                    id="{{data_value}}"
                    value="{{data_value}}" />
            {{#if display.image}}
                <div>
                    <img src="{{formDirectory}}{{localize display.image}}"></img>
                </div>
            {{/if}}
            {{#if display.text}}
                {{#substitute}}{{localize display.text}}{{/substitute}}
            {{/if}}
            </label>
        {{/each}}
    </fieldset>
    {{#unless required}}
        {{#if false}}
        {{#if display.deselect}}
            <div style="clear:both;"></div>
            <a data-role="button" data-mini="true" class="deselect inline-deselect">{{localize display.deselect}}</a>
        {{/if}}
    	{{/if}}
    {{/unless}}
    <div style="clear:both;"></div>
</form>
